import React, { useRef } from 'react'

export default function App() {
    let inputRef = useRef('sdkfj')
    // console.log('inputRef: ', inputRef);//{current: 'sdkfj'}

    return (
        <div>
            <input type="text" name="" id="" ref={inputRef}/>
            <button onClick={()=>{
                console.log('inputRef: ', inputRef);
                console.log('dom: ', inputRef.current);
                console.log('value: ', inputRef.current.value);
            }}>get Ref</button>
        </div>
    )
}
